package com.example.demo.Control;

import com.example.demo.Service.UserService;
import com.example.demo.entity.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping("/u")
public class UserControl {
    @Resource
    private UserService userService;
    @RequestMapping("/getall")
    public List<User> getall(){
        return userService.getall();
    }
}
